package cn.iocoder.an.module.business.dal.mysql.equipmentkeeptype;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.equipmentkeeptype.EquipmentKeepTypeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.equipmentkeeptype.vo.*;
import org.springframework.stereotype.Repository;

/**
 * 设备保养分类 Mapper
 *
 * @author zzy
 */
@Mapper
@Repository("EquipmentKeepTypeMapper")
public interface EquipmentKeepTypeMapper extends BaseMapperX<EquipmentKeepTypeDO> {

    default PageResult<EquipmentKeepTypeDO> selectPage(EquipmentKeepTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<EquipmentKeepTypeDO>()
                .likeIfPresent(EquipmentKeepTypeDO::getName, reqVO.getName())
                .eqIfPresent(EquipmentKeepTypeDO::getStatus, reqVO.getStatus())
                .eqIfPresent(EquipmentKeepTypeDO::getDescription, reqVO.getDescription())
                .orderByDesc(EquipmentKeepTypeDO::getId));
    }

}